package com.wkbb.common.enums;

public enum ScreenTypeEnum {

    /**
     * 10.1寸
     */
    SCREENTYPEONE(1,"10.1寸"),
    /**
     * 21.5寸
     */
    SCREENTYPETWO(2,"21.5寸"),
    /**
     * 4寸
     */
    SCREENTYPETHREE(3,"4寸"),
    /**
     * 7寸
     */
    SCREENTYPEFOUR(4,"7寸");


    private ScreenTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public int getValue() {
        return this.value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (RoleTypeEnum roleType : RoleTypeEnum.values()) {
            if (roleType.getValue()==value) {
                return roleType.getDesc();
            }
        }
        return null;
    }

    public static ScreenTypeEnum getEnumByValue(Integer value) {
        for (ScreenTypeEnum screenTypeEnum : ScreenTypeEnum.values()) {
            if (screenTypeEnum.getValue()==value) {
                return screenTypeEnum;
            }
        }
        return null;
    }
}
